const buildDictionaryStatusData = (obj: Record<string, number[]>) => {
  const arr: any[] = [];
  let defaultValue = '';
  if (obj) {
    const allValArr: number[] = [];
    Object.entries(obj).forEach((v) => {
      arr.push({
        label: v[0],
        value: v[1].join(','),
      });
      allValArr.push(...v[1]);
    });
    defaultValue = allValArr.join(',');
    arr.unshift({
      label: '全部',
      value: defaultValue,
    });
  }
  return { arr, defaultValue };
};

export { buildDictionaryStatusData };
